From 60e66b302eb3804bcf76f4dbd8f8b17a0f135d7e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 26 Jul 2015 08:58:59 -0700 Subject: [PATCH] Fix compile on nightly The lints for C apis were tweaked recently and 0-size structs aren't liked. These should be empty `enum`s anyway, however, to ensure they're never created. --- src/cargo/util/sha256.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cargo/util/sha256.rs b/src/cargo/util/sha256.rs index 8066ab74e..04e197421 100644 --- a/src/cargo/util/sha256.rs +++ b/src/cargo/util/sha256.rs @@ -3,12 +3,13 @@ pub use self::imp::Sha256; // Someone upstream will link to OpenSSL, so we don't need to explicitly // link to it ourselves. Hence we pick up Sha256 digests from OpenSSL #[cfg(not(windows))] +#[allow(bad_style)] mod imp { use libc; - #[repr(C)] struct EVP_MD_CTX; - #[repr(C)] struct EVP_MD; - #[repr(C)] struct ENGINE; + enum EVP_MD_CTX {} + enum EVP_MD {} + enum ENGINE {} extern { fn EVP_DigestInit_ex(ctx: *mut EVP_MD_CTX, -- 2.30.2